<?php
@include('include/common.inc.php');
@include('logincleck.php');	
if($_POST['add']==1)
{		
	$inbank = work_str($_POST["inbank"], 1);			
	$innum = work_str($_POST["innum"], 1);	
	$outbank = work_str($_POST["outbank"], 1);	
	$outnum = work_str($_POST["outnum"], 1);	
	$name = work_str($_POST["name"], 1);
	$price = work_str($_POST["price"], 1);
	$linkman = work_str($_POST["linkman"], 1);
	$addr = work_str($_POST["addr"], 1);
	$tel = work_str($_POST["tel"], 1);	
	$mem_id = $_SESSION['mem_id'];
	$date = work_str($_POST["mobile"], 1).'月'.work_str($_POST["mobile"], 1).'日'.work_str($_POST["mobile"], 1).'時'.work_str($_POST["mobile"], 1).'分';	
	$time =date('Y-m-d H:i:s');			    
	$insert = "insert into $TBL_REPAY (id,inbank,innum,outbank,outnum,name,senttime,addr,price,linkman,tel,datetime,mem_id)
	values (null,'$inbank','$innum','$outbank','$outnum','$name','$date','$addr','$price','$linkman','$tel','$time','$mem_id')";
	if(mysql_query($insert))
	{
		MyNotice("Success!", 2, "index.php");
	}else{		
		MyNotice("Sorry!", 1, "login.php");
	}
	
}
@include('right.php');
//@include('number.php');//验证码
$smarty->assign("mem_id",$_SESSION['mem_id']);
$smarty->assign("type",$_SESSION['type']);
$smarty->display('payback.html');

?>